package adv.i31.RobotMin3d;

import java.io.IOException;
import java.io.OutputStreamWriter;

import android.bluetooth.BluetoothSocket;

public class BluetoothConnection implements IConnection
{
	// Members
	private BluetoothSocket		mSocket;


	// methods
	public BluetoothConnection(BluetoothSocket s) {
		mSocket = s;
	}

	@Override
	public void sendString( String s) {
		try {
			OutputStreamWriter writer = new OutputStreamWriter(mSocket.getOutputStream());
			writer.write(s);
			writer.flush();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
}
